package com.hehui.partimejob.uitls;

import android.content.Context;
import android.text.TextUtils;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

public class MyUtil {

    public static boolean checkTextViewHasValue(TextView... textView) {
        for (TextView view : textView) {
            if (TextUtils.isEmpty(view.getText())){
                return false;
            }
        }
        return true;
    }public static boolean checkEditViewHasValue(EditText... editTexts) {
        for (EditText view : editTexts) {
            if (TextUtils.isEmpty(view.getText())){
                return false;
            }
        }
        return true;
    }public static boolean checkHasValue(Context context,String... textView) {
        for (String str : textView) {
            if (TextUtils.isEmpty(str)){
                Toast.makeText(context, "请输入完整内容", Toast.LENGTH_SHORT).show();
                return false;
            }
        }
        return true;
    }
}
